
// Generated from ./parser/grammar/CommonLexer.g4 by ANTLR 4.8

#pragma once


#include "../cyclone_lexer_base.h"
using namespace cyclone::parser;


#include "antlr4-runtime.h"


namespace cyclone {


class  CommonLexer : public CycloneLexerBase {
public:
  enum {
    MultiLineComment = 1, SingleLineComment = 2, RegularExpressionLiteral = 3, 
    OpenBracket = 4, CloseBracket = 5, OpenParen = 6, CloseParen = 7, OpenBrace = 8, 
    TemplateCloseBrace = 9, CloseBrace = 10, SemiColon = 11, Comma = 12, 
    Assign = 13, QuestionMark = 14, Colon = 15, Ellipsis = 16, Dot = 17, 
    PlusPlus = 18, MinusMinus = 19, Plus = 20, Minus = 21, BitNot = 22, 
    Not = 23, Multiply = 24, Divide = 25, Modulus = 26, Exponentiation = 27, 
    Hashtag = 28, RightShiftArithmetic = 29, LeftShiftArithmetic = 30, RightShiftLogical = 31, 
    LessThan = 32, MoreThan = 33, LessThanEquals = 34, GreaterThanEquals = 35, 
    Equals_ = 36, NotEquals = 37, IdentityEquals = 38, IdentityNotEquals = 39, 
    BitAnd = 40, BitXOr = 41, BitOr = 42, And = 43, Or = 44, DoubleQuestionMark = 45, 
    OptionalChainingOperator = 46, MultiplyAssign = 47, DivideAssign = 48, 
    ModulusAssign = 49, ExponentiationAssign = 50, PlusAssign = 51, MinusAssign = 52, 
    LeftShiftArithmeticAssign = 53, RightShiftArithmeticAssign = 54, RightShiftLogicalAssign = 55, 
    BitAndAssign = 56, BitXorAssign = 57, BitOrAssign = 58, ARROW = 59, 
    NullLiteral = 60, BooleanLiteral = 61, DecimalLiteral = 62, HexIntegerLiteral = 63, 
    OctalIntegerLiteral = 64, OctalIntegerLiteral2 = 65, BinaryIntegerLiteral = 66, 
    BigInt = 67, Break = 68, Do = 69, Instanceof = 70, Typeof = 71, Case = 72, 
    Else = 73, New = 74, Var = 75, Catch = 76, Finally = 77, Return = 78, 
    Void = 79, Continue = 80, For = 81, Switch = 82, While = 83, Debugger = 84, 
    Function_ = 85, This = 86, With = 87, Default = 88, If = 89, Throw = 90, 
    Delete = 91, In = 92, Of = 93, Try = 94, As = 95, From = 96, ReadOnly = 97, 
    Async = 98, Class = 99, Enum = 100, Extends = 101, Super = 102, Const = 103, 
    Export = 104, Import = 105, Implements = 106, Let = 107, Private = 108, 
    Public = 109, Interface = 110, Package = 111, Protected = 112, Static = 113, 
    Yield = 114, Await = 115, Any = 116, Number = 117, Boolean = 118, String = 119, 
    Symbol = 120, Undefined = 121, BigIntAnnotation = 122, Int8 = 123, Int16 = 124, 
    Int32 = 125, Int64 = 126, Uint8 = 127, Uint16 = 128, Uint32 = 129, Uint64 = 130, 
    Float = 131, Double = 132, Decimal = 133, Array = 134, Object = 135, 
    Tuple = 136, Struct = 137, Union = 138, Variant = 139, TypeAlias = 140, 
    Get = 141, Set = 142, Constructor = 143, Namespace = 144, Module = 145, 
    Declare = 146, Abstract = 147, Is = 148, At = 149, SingQuote = 150, 
    DoubleQuote = 151, QuestionMarkFollowedByDecimalDirectly = 152, Identifier = 153, 
    StringLiteral = 154, BackTick = 155, WhiteSpaces = 156, LineTerminator = 157, 
    HtmlComment = 158, CDataComment = 159, UnexpectedCharacter = 160, TemplateStringStartExpression = 161, 
    TemplateStringAtom = 162
  };

  enum {
    ERROR = 2
  };

  enum {
    TEMPLATE = 1
  };

  CommonLexer(antlr4::CharStream *input);
  ~CommonLexer();

  virtual std::string getGrammarFileName() const override;
  virtual const std::vector<std::string>& getRuleNames() const override;

  virtual const std::vector<std::string>& getChannelNames() const override;
  virtual const std::vector<std::string>& getModeNames() const override;
  virtual const std::vector<std::string>& getTokenNames() const override; // deprecated, use vocabulary instead
  virtual antlr4::dfa::Vocabulary& getVocabulary() const override;

  virtual const std::vector<uint16_t> getSerializedATN() const override;
  virtual const antlr4::atn::ATN& getATN() const override;

  virtual void action(antlr4::RuleContext *context, size_t ruleIndex, size_t actionIndex) override;
  virtual bool sempred(antlr4::RuleContext *_localctx, size_t ruleIndex, size_t predicateIndex) override;

private:
  static std::vector<antlr4::dfa::DFA> _decisionToDFA;
  static antlr4::atn::PredictionContextCache _sharedContextCache;
  static std::vector<std::string> _ruleNames;
  static std::vector<std::string> _tokenNames;
  static std::vector<std::string> _channelNames;
  static std::vector<std::string> _modeNames;

  static std::vector<std::string> _literalNames;
  static std::vector<std::string> _symbolicNames;
  static antlr4::dfa::Vocabulary _vocabulary;
  static antlr4::atn::ATN _atn;
  static std::vector<uint16_t> _serializedATN;


  // Individual action functions triggered by action() above.
  void OpenBraceAction(antlr4::RuleContext *context, size_t actionIndex);
  void CloseBraceAction(antlr4::RuleContext *context, size_t actionIndex);
  void StringLiteralAction(antlr4::RuleContext *context, size_t actionIndex);
  void BackTickAction(antlr4::RuleContext *context, size_t actionIndex);
  void BackTickInsideAction(antlr4::RuleContext *context, size_t actionIndex);

  // Individual semantic predicate functions triggered by sempred() above.
  bool RegularExpressionLiteralSempred(antlr4::RuleContext *_localctx, size_t predicateIndex);
  bool TemplateCloseBraceSempred(antlr4::RuleContext *_localctx, size_t predicateIndex);
  bool OctalIntegerLiteralSempred(antlr4::RuleContext *_localctx, size_t predicateIndex);

  struct Initializer {
    Initializer();
  };
  static Initializer _init;
};

}  // namespace cyclone
